

/* First created by JCasGen Mon Mar 28 12:51:53 CEST 2011 */
package ia1011.zanzibar.chaos.type;

import org.apache.uima.jcas.JCas; 
import org.apache.uima.jcas.JCasRegistry;
import org.apache.uima.jcas.cas.TOP_Type;

import org.apache.uima.jcas.cas.FSArray;
import org.apache.uima.jcas.tcas.Annotation;


/** A Constituent is a contiguos portion of a Phrase acting as a syntactic unit. A Constituent is a tree structure. Leaves are simple constituents (SimpleConstituent) and intermediate nodes are complex constituents (ComplexConstituent).
 * Updated by JCasGen Mon Mar 28 12:52:46 CEST 2011
 * XML source: /home/berardino/universita/IA/progetti_IA/Zanzibar/desc/Chaos/TypeSystemDescriptors/ChaosUimaTypeSystem.xml
 * @generated */
public class UimaConstituent extends Annotation {
  /** @generated
   * @ordered 
   */
  public final static int typeIndexID = JCasRegistry.register(UimaConstituent.class);
  /** @generated
   * @ordered 
   */
  public final static int type = typeIndexID;
  /** @generated  */
  public              int getTypeIndexID() {return typeIndexID;}
 
  /** Never called.  Disable default constructor
   * @generated */
  protected UimaConstituent() {}
    
  /** Internal - constructor used by generator 
   * @generated */
  public UimaConstituent(int addr, TOP_Type type) {
    super(addr, type);
    readObject();
  }
  
  /** @generated */
  public UimaConstituent(JCas jcas) {
    super(jcas);
    readObject();   
  } 

  /** @generated */  
  public UimaConstituent(JCas jcas, int begin, int end) {
    super(jcas);
    setBegin(begin);
    setEnd(end);
    readObject();
  }   

  /** <!-- begin-user-doc -->
    * Write your own initialization here
    * <!-- end-user-doc -->
  @generated modifiable */
  private void readObject() {}
     
 
    
  //*--------------*
  //* Feature: id

  /** getter for id - gets 
   * @generated */
  public int getId() {
    if (UimaConstituent_Type.featOkTst && ((UimaConstituent_Type)jcasType).casFeat_id == null)
      jcasType.jcas.throwFeatMissing("id", "ia1011.zanzibar.chaos.type.UimaConstituent");
    return jcasType.ll_cas.ll_getIntValue(addr, ((UimaConstituent_Type)jcasType).casFeatCode_id);}
    
  /** setter for id - sets  
   * @generated */
  public void setId(int v) {
    if (UimaConstituent_Type.featOkTst && ((UimaConstituent_Type)jcasType).casFeat_id == null)
      jcasType.jcas.throwFeatMissing("id", "ia1011.zanzibar.chaos.type.UimaConstituent");
    jcasType.ll_cas.ll_setIntValue(addr, ((UimaConstituent_Type)jcasType).casFeatCode_id, v);}    
   
    
  //*--------------*
  //* Feature: kind

  /** getter for kind - gets 
   * @generated */
  public String getKind() {
    if (UimaConstituent_Type.featOkTst && ((UimaConstituent_Type)jcasType).casFeat_kind == null)
      jcasType.jcas.throwFeatMissing("kind", "ia1011.zanzibar.chaos.type.UimaConstituent");
    return jcasType.ll_cas.ll_getStringValue(addr, ((UimaConstituent_Type)jcasType).casFeatCode_kind);}
    
  /** setter for kind - sets  
   * @generated */
  public void setKind(String v) {
    if (UimaConstituent_Type.featOkTst && ((UimaConstituent_Type)jcasType).casFeat_kind == null)
      jcasType.jcas.throwFeatMissing("kind", "ia1011.zanzibar.chaos.type.UimaConstituent");
    jcasType.ll_cas.ll_setStringValue(addr, ((UimaConstituent_Type)jcasType).casFeatCode_kind, v);}    
   
    
  //*--------------*
  //* Feature: coindex

  /** getter for coindex - gets 
   * @generated */
  public int getCoindex() {
    if (UimaConstituent_Type.featOkTst && ((UimaConstituent_Type)jcasType).casFeat_coindex == null)
      jcasType.jcas.throwFeatMissing("coindex", "ia1011.zanzibar.chaos.type.UimaConstituent");
    return jcasType.ll_cas.ll_getIntValue(addr, ((UimaConstituent_Type)jcasType).casFeatCode_coindex);}
    
  /** setter for coindex - sets  
   * @generated */
  public void setCoindex(int v) {
    if (UimaConstituent_Type.featOkTst && ((UimaConstituent_Type)jcasType).casFeat_coindex == null)
      jcasType.jcas.throwFeatMissing("coindex", "ia1011.zanzibar.chaos.type.UimaConstituent");
    jcasType.ll_cas.ll_setIntValue(addr, ((UimaConstituent_Type)jcasType).casFeatCode_coindex, v);}    
   
    
  //*--------------*
  //* Feature: coindex_type

  /** getter for coindex_type - gets 
   * @generated */
  public String getCoindex_type() {
    if (UimaConstituent_Type.featOkTst && ((UimaConstituent_Type)jcasType).casFeat_coindex_type == null)
      jcasType.jcas.throwFeatMissing("coindex_type", "ia1011.zanzibar.chaos.type.UimaConstituent");
    return jcasType.ll_cas.ll_getStringValue(addr, ((UimaConstituent_Type)jcasType).casFeatCode_coindex_type);}
    
  /** setter for coindex_type - sets  
   * @generated */
  public void setCoindex_type(String v) {
    if (UimaConstituent_Type.featOkTst && ((UimaConstituent_Type)jcasType).casFeat_coindex_type == null)
      jcasType.jcas.throwFeatMissing("coindex_type", "ia1011.zanzibar.chaos.type.UimaConstituent");
    jcasType.ll_cas.ll_setStringValue(addr, ((UimaConstituent_Type)jcasType).casFeatCode_coindex_type, v);}    
   
    
  //*--------------*
  //* Feature: isTheMain

  /** getter for isTheMain - gets 
   * @generated */
  public boolean getIsTheMain() {
    if (UimaConstituent_Type.featOkTst && ((UimaConstituent_Type)jcasType).casFeat_isTheMain == null)
      jcasType.jcas.throwFeatMissing("isTheMain", "ia1011.zanzibar.chaos.type.UimaConstituent");
    return jcasType.ll_cas.ll_getBooleanValue(addr, ((UimaConstituent_Type)jcasType).casFeatCode_isTheMain);}
    
  /** setter for isTheMain - sets  
   * @generated */
  public void setIsTheMain(boolean v) {
    if (UimaConstituent_Type.featOkTst && ((UimaConstituent_Type)jcasType).casFeat_isTheMain == null)
      jcasType.jcas.throwFeatMissing("isTheMain", "ia1011.zanzibar.chaos.type.UimaConstituent");
    jcasType.ll_cas.ll_setBooleanValue(addr, ((UimaConstituent_Type)jcasType).casFeatCode_isTheMain, v);}    
   
    
  //*--------------*
  //* Feature: morphologicalFeatures

  /** getter for morphologicalFeatures - gets 
   * @generated */
  public String getMorphologicalFeatures() {
    if (UimaConstituent_Type.featOkTst && ((UimaConstituent_Type)jcasType).casFeat_morphologicalFeatures == null)
      jcasType.jcas.throwFeatMissing("morphologicalFeatures", "ia1011.zanzibar.chaos.type.UimaConstituent");
    return jcasType.ll_cas.ll_getStringValue(addr, ((UimaConstituent_Type)jcasType).casFeatCode_morphologicalFeatures);}
    
  /** setter for morphologicalFeatures - sets  
   * @generated */
  public void setMorphologicalFeatures(String v) {
    if (UimaConstituent_Type.featOkTst && ((UimaConstituent_Type)jcasType).casFeat_morphologicalFeatures == null)
      jcasType.jcas.throwFeatMissing("morphologicalFeatures", "ia1011.zanzibar.chaos.type.UimaConstituent");
    jcasType.ll_cas.ll_setStringValue(addr, ((UimaConstituent_Type)jcasType).casFeatCode_morphologicalFeatures, v);}    
   
    
  //*--------------*
  //* Feature: alternativeLemmas

  /** getter for alternativeLemmas - gets 
   * @generated */
  public FSArray getAlternativeLemmas() {
    if (UimaConstituent_Type.featOkTst && ((UimaConstituent_Type)jcasType).casFeat_alternativeLemmas == null)
      jcasType.jcas.throwFeatMissing("alternativeLemmas", "ia1011.zanzibar.chaos.type.UimaConstituent");
    return (FSArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((UimaConstituent_Type)jcasType).casFeatCode_alternativeLemmas)));}
    
  /** setter for alternativeLemmas - sets  
   * @generated */
  public void setAlternativeLemmas(FSArray v) {
    if (UimaConstituent_Type.featOkTst && ((UimaConstituent_Type)jcasType).casFeat_alternativeLemmas == null)
      jcasType.jcas.throwFeatMissing("alternativeLemmas", "ia1011.zanzibar.chaos.type.UimaConstituent");
    jcasType.ll_cas.ll_setRefValue(addr, ((UimaConstituent_Type)jcasType).casFeatCode_alternativeLemmas, jcasType.ll_cas.ll_getFSRef(v));}    
    
  /** indexed getter for alternativeLemmas - gets an indexed value - 
   * @generated */
  public UimaLemma getAlternativeLemmas(int i) {
    if (UimaConstituent_Type.featOkTst && ((UimaConstituent_Type)jcasType).casFeat_alternativeLemmas == null)
      jcasType.jcas.throwFeatMissing("alternativeLemmas", "ia1011.zanzibar.chaos.type.UimaConstituent");
    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((UimaConstituent_Type)jcasType).casFeatCode_alternativeLemmas), i);
    return (UimaLemma)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((UimaConstituent_Type)jcasType).casFeatCode_alternativeLemmas), i)));}

  /** indexed setter for alternativeLemmas - sets an indexed value - 
   * @generated */
  public void setAlternativeLemmas(int i, UimaLemma v) { 
    if (UimaConstituent_Type.featOkTst && ((UimaConstituent_Type)jcasType).casFeat_alternativeLemmas == null)
      jcasType.jcas.throwFeatMissing("alternativeLemmas", "ia1011.zanzibar.chaos.type.UimaConstituent");
    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((UimaConstituent_Type)jcasType).casFeatCode_alternativeLemmas), i);
    jcasType.ll_cas.ll_setRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((UimaConstituent_Type)jcasType).casFeatCode_alternativeLemmas), i, jcasType.ll_cas.ll_getFSRef(v));}
  }

    